//
//  bangdingshoujiViewController.m
//  个人信息
//
//  Created by IOSchengxuyuan on 15/12/1.
//  Copyright © 2015年 com.ppfur. All rights reserved.
//

#import "bangdingshoujiViewController.h"

@interface bangdingshoujiViewController (){
    float aa,bb;
    float width,height;
    UITableViewCell*cell;
    UITextField*tt;
}

@end

@implementation bangdingshoujiViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    _mytable.delegate=self;
    _mytable.dataSource=self;
    width=[UIScreen mainScreen].bounds.size.width;
    height=[UIScreen mainScreen].bounds.size.height;
    aa=width/320;
    bb=height/568;
    tt.delegate=self;
    _mytable.frame=CGRectMake(0, 0, width, 200);
    _mytable.scrollEnabled=NO;
    _bb.frame=CGRectMake(30*aa, 200*bb, 260*aa, 40*bb);
    _bb.layer.cornerRadius=5.0f;
    // Do any additional setup after loading the view.
}
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    return 2;
}
-(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{
    return 5;
}
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
    return 59;
}
-(CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section{
    return 2;
}

-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
    
    [tableView deselectRowAtIndexPath:indexPath animated:NO];
}
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    static NSString *id=@"row";
    cell=[tableView dequeueReusableCellWithIdentifier:id];
    if (cell==nil)
    {
        cell=[[UITableViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:id];
    }
    NSArray *row1=[cell.contentView subviews];
    cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
    for (UIView *vv2 in row1)
    {
        [vv2 removeFromSuperview];
    }
    if (indexPath.row==0) {
        UILabel*ll1=[[UILabel alloc]initWithFrame:CGRectMake(10, 15, 60, 30)];
        ll1.font=[UIFont systemFontOfSize:14.0f];
        ll1.text=@"国家地区";
        [cell.contentView addSubview:ll1];
        UILabel*ll2=[[UILabel alloc]initWithFrame:CGRectMake(220*aa, 20, 100*aa, 20)];
        ll2.text=@"中国大陆+86";
//        ll2.textColor=[UIColor lightGrayColor];
        ll2.font=[UIFont systemFontOfSize:13.0f];
        [cell.contentView addSubview:ll2];
    }else if(indexPath.row==1){
        UILabel*ll1=[[UILabel alloc]initWithFrame:CGRectMake(10, 12, 60, 30)];
        ll1.font=[UIFont systemFontOfSize:14.0f];
        ll1.text=@"手 机 号";
        [cell.contentView addSubview:ll1];
        tt=[[UITextField alloc] initWithFrame:CGRectMake(70*aa, 1, width-100*aa, 55)];
        tt.placeholder=@"请输入手机号码";
        tt.font=[UIFont systemFontOfSize:13.0f];
        [cell.contentView addSubview:tt];
    }
    return cell;
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

- (IBAction)xiayibu:(id)sender {
}
@end
